import 'package:flutter/material.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Table组件',
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Table组件'),
        ),
        body: Center(
          child: Container(
            //表格
            child: Table(
              //所有列宽
              columnWidths: const {
                //列宽
                0: FixedColumnWidth(100.0),
                1: FixedColumnWidth(200.0),
                2: FixedColumnWidth(50.0),
              },
              //表格边框样式
              border: TableBorder.all(
                color: Colors.white54,
                width: 2.0,
                style: BorderStyle.solid,
              ),
              children: [

                TableRow(

                    children: [
                      Text('商品名称'),

                      Text('20'),
                    ]
                ),
                TableRow(
                    children: [
                      Text('商品hash码'),

                      Text('28'),
                    ]
                ),
                TableRow(
                    children: [
                      Text('价值'),

                      Text('28'),
                    ]
                ),
                TableRow(
                    children: [
                      Text('账单索引'),

                      Text('28'),
                    ]
                ),

              ],
            ),
          ),
        ),
      ),
    );
  }
}



